﻿using Microsoft.AspNetCore.Mvc;
using MiniFox.Platform;
using MiniFox.Platform.Applications.Web;
using MiniFox.Platform.File.Models;
using MiniFox.Web.Infrastructure;
using Platform.Core;

namespace Platform.Web.Controllers
{
    /// <summary>
    /// 
    /// </summary>
    [NoCache, PublicAccessible]
    public class WatermarkController : AuthorizedController<IWatermarkService>
    {
        /// <summary>
        /// 获取当前登录人水印
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public ActionResult Load()
        {
            FileData fileData = this.Component.CreateWatermark();
            return File(fileData.Data, fileData.ContentType, fileData.DisplayName);
        }
    }
}